/*
 * Copyright (C) 2015 - present Instructure, Inc.
 *
 * This file is part of Canvas.
 *
 * Canvas is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License as published by the Free
 * Software Foundation, version 3 of the License.
 *
 * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License along
 * with this program. If not, see <http://www.gnu.org/licenses/>.
 */

@import "base/environment";

$stripeColor: #f3f4f8;

/* normal table style overrides (make 6 tables look like one) */
thead th {
  background: #fff;
}

.table-bordered {
  border-bottom: none;
  border-radius: 0;
  margin-bottom: 0;
  thead {
    tr:first-child th:first-child {
      border-top-left-radius: 0 !important;
      min-width: 175px;
    }
    tr:first-child th:last-child {
      border-top-right-radius: 0 !important;
    }
  }
  tbody {
    tr:last-child th {
      border-bottom-left-radius: 0 !important;
    }
    tr:last-child td:last-child {
      border-bottom-right-radius: 0 !important;
    }
  }
}

.table-bordered:first-of-type {
  border-radius: 4px 4px 0 0;
  thead {
    tr:first-child th:first-child {
      border-top-left-radius: 4px !important;
    }
    tr:first-child th:last-child {
      border-top-right-radius: 4px !important;
    }
  }
  .channel-name, .channel-addr {
    opacity: 100;
  }
}

.table-bordered:last-of-type {
  border-bottom: 1px solid #ddd;
  border-radius: 0 0 4px 4px;
  tbody {
    tr:last-child th {
      border-bottom-left-radius: 4px !important;
    }
    tr:last-child td:last-child {
      border-bottom-right-radius: 4px !important;
    }
  }
}

.comm-channel {
  min-width: 125px;
}

.channel-name, .channel-addr {
  opacity: 0;
}

/* Column striping */

.notification-table-wrapper {
  transition: margin 0.3s ease;
}

@media screen and (max-width: 1300px) {
  .notification-table-wrapper {
    margin-right: 40px;
  }
}

#notification-legend {
  display: flex;
  justify-content: space-around;
  padding-bottom: 12px;
}

.notification-prefs-table {
  .ui-button {
    margin-left: 0;
    margin-right: 0;
    padding: 2px; // fixes FF padding issues
  }
  .ui-buttonset {
    margin-left: 0;
    margin-right: 0;
  }
  .grouping > td:first-child {
    min-width: 205px;
  }
  .group-name {
    display: inline-block;
    font-weight: bold;
    margin-bottom: 0;
    padding-top: 0.25em;
    line-height: 1em;
  }
  .category-name {
    font-size: 1.2em;
    font-weight: normal;
    vertical-align: middle;
  }
  tr:not(:first-child) .comm-channel > div {
    display: none;
  }
  .comm-channel {
    text-align: center;
  }
  .channel-addr {
    font-weight: normal;
    font-size: 0.8em;
  }
  .comm-event {
    position: relative;
    .row-title-cell {
      position: relative;
    }
  }
  td.comm-event-option {
    text-align: center;
    width: 110px;
    min-width: 110px;
    padding: 4px;
    vertical-align: middle;
    label {
      margin: 0;
    }
    legend {
      border: none;
    }
  }
  .user-preference {
    margin-left: 1.1em;
    label {
      display: block;
      @include fontSize(13px);
    }
  }
}

h2, .h2 {
  position: relative;
  #notifications_save_status {
    position: absolute;
    right: 0;
    top: 0;
    width: 40px;
    height: 40px;
  }
}

.weekly_notification_range {
  color: gray;
  font-style: italic;
  padding-left: 1em;
}
